<?php 

class Recipe extends AppModel{
	
	
	
	public $belongsTo = array(	'RecipeTemplate' => array(
										'className' => 'RecipeTemplate',
										'foreignKey' => 'template_id'
									)
			
							);
							
							
	
	public $hasAndBelongsToMany = array( 	'RecipeCategory' => array(
												'className' => 'RecipeCategory',
												'joinTable' => 'recipes_recipe_categories',
												'foreignKey' => 'recipe_id',
												'associationForeignKey' => 'category_id'
											),
			
											'RecipeMain' => array(
												'className' => 'RecipeMain',
												'joinTable' => 'recipes_recipe_mains',
												'foreignKey' => 'recipe_id',
												'associationForeignKey' => 'main_id'
											)
		
										);
	
	
}								


?>